import request from '@/utils/request'
export const urlPrefix = '/tms/job/plugin/'
// 查询任务插件列表
export function listJobPlugin(query) {
    return request({
        url: urlPrefix,
        method: 'get',
        params: query
    })
}

// 查询任务插件详细
export function getJobPlugin(id) {
    return request({
        url: urlPrefix + `${id}/`,
        method: 'get',
    })
}

// 新增任务插件
export function addJobPlugin(data) {
    return request({
        url: urlPrefix,
        method: 'post',
        data: data
    })
}

// 删除任务插件
export function delJobPlugin(id) {
    return request({
        url: urlPrefix + `${id}/`,
        method: 'delete'
    })
}

// 修改任务插件
export function updateJobPlugin(data) {
    return request({
        url: urlPrefix + `${data.id}/`,
        method: 'put',
        data: data,
    })
}